package capitulo3;

import java.awt.Polygon;
import java.awt.Rectangle;

// Ship class - Polygonal shape of the player's ship
public class Ship extends BaseVectorShape {

	private int[] shipX = { -6, -3, 0, 3, 6, 0 };
	private int[] shipY = { 6, 7, 7, 7, 6 , -7 };
	
	//Bounding rectangle
	public Rectangle getBounds() {
		
		Rectangle r;
		r = new Rectangle((int)getX()-6,(int)getY()-6, 12, 12);
		return r;
	}
	
	Ship(){
		setShape(new Polygon(shipX, shipY, shipX.length));
		setAlive(true);
	}	
}
